const express = require('express');
const app = express();
// 托管静态文件
// app.use(express.static('public'));
// http://localhost:3000/html/index.html
// http://localhost:3000/html/login.html
// http://localhost:3000/html/register.html
// http://localhost:3000/img/1.png
// http://localhost:3000/img/2.png
// http://localhost:3000/img/3.png
// http://localhost:3000/img1/img2/3.png
app.use('/static',express.static('public'));
// http://localhost:3000/static/html/index.html
//http://localhost:3000/static/img1/img2/3.png

// http://192.168.110.129:3000/static/img1/img2/3.png

app.listen(3000,err=>{
    if(!err) console.log('服务器启动成功！！');
    else console.log(err);
})